﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;

namespace Provider.Consul.Controllers
{
    [Route("api/[controller]/[action]")]
    public class TestController : Controller
    {
        private IConfiguration _configuration;
        public TestController(IConfiguration configuration)
        {
            _configuration = configuration;
        }
        public IActionResult GetName()
        {
            string port = _configuration["port"];
            return Json($"端口:{port}，姓名:张三");
        }
    }
}
